home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form1
- Caption = "Subdirectory Icon Viewer"
- ClientHeight = 4020
- ClientLeft = 1425
- ClientTop = 1515
- ClientWidth = 7365
- Height = 4425
- Left = 1365
- LinkTopic = "Form1"
- ScaleHeight = 4020
- ScaleWidth = 7365
- Top = 1170
- Width = 7485
- Begin CommandButton Command3
- Caption = "End"
- Height = 615
- Left = 2760
- TabIndex = 2
- Top = 3240
- Width = 1695
- End
- Begin CommandButton Command2
- Caption = "Show Icons"
- Enabled = 0 'False
- Height = 615
- Left = 4800
- TabIndex = 1
- Top = 3240
- Width = 2295
- End
- Begin CommandButton Command1
- Caption = "Choose a subdirectory"
- Height = 615
- Left = 240
- TabIndex = 0
- Top = 3240
- Width = 2175
- End
- Begin Label Label1
- Alignment = 2 'Center
- Caption = "Click on an Icon to See Its Path"
- Height = 255
- Left = 1920
- TabIndex = 3
- Top = 2880
- Visible = 0 'False
- Width = 3135
- End
- Begin Image Image1
- Height = 495
- Index = 0
- Left = 0
- Top = 0
- Width = 495
- End
- Option Explicit
- Dim pic_count As Integer
- Const DEFAULT = 0 ' 0 - Default
- Const ARROW = 1 ' 1 - Arrow
- Const CROSSHAIR = 2 ' 2 - Cross
- Const IBEAM = 3 ' 3 - I-Beam
- Const ICON_POINTER = 4 ' 4 - Icon
- Const SIZE_POINTER = 5 ' 5 - Size
- Const SIZE_NE_SW = 6 ' 6 - Size NE SW
- Const SIZE_N_S = 7 ' 7 - Size N S
- Const SIZE_NW_SE = 8 ' 8 - Size NW SE
- Const SIZE_W_E = 9 ' 9 - Size W E
- Const UP_ARROW = 10 ' 10 - Up Arrow
- Const HOURGLASS = 11 ' 11 - Hourglass
- Const NO_DROP = 12 ' 12 - No drop
- Sub clear_icons ()
- Dim i As Integer
- 'Set the image control array back to just 1 control
- For i = 1 To pic_count
- Unload image1(i)
- Next i
- image1(0).Visible = False
- pic_count = 0
- End Sub
- Sub Command1_Click ()
- clear_icons
- form2.Show
- End Sub
- Sub Command2_Click ()
- Dim PictureName As String
- Dim i As Integer, rc As Integer
- Dim mytop As Integer, myleft As Integer
- Dim widthdelta As Integer, heightdelta As Integer
- widthdelta = 600: heightdelta = 500
- mytop = 100: myleft = -widthdelta + 100
- clear_icons
- 'Next, pull the files into the image controls.
- screen.MousePointer = HOURGLASS
- pic_count = form2.File1.ListCount - 1
- For i = 0 To pic_count
- If i <> 0 Then Load image1(i)
- image1(i).Left = myleft
- If image1(i).Left > Form1.ScaleWidth - 2 * widthdelta Then
- myleft = 100
- mytop = mytop + heightdelta
- Else
- myleft = myleft + widthdelta
- End If
- image1(i).Move myleft, mytop
- PictureName = form2.Dir1.Path
- If Right$(PictureName, 1) <> "\" Then
- PictureName = PictureName + "\"
- End If
- form2.File1.ListIndex = i
- PictureName = PictureName + form2.File1
- image1(i).Picture = LoadPicture(PictureName)
- Next i
- 'Now that they're all in memory, show 'em.
- For i = 0 To pic_count
- image1(i).Visible = True
- Next i
- screen.MousePointer = DEFAULT
- command2.Enabled = False
- label1.Visible = True
- End Sub
- Sub Command3_Click ()
- End
- End Sub
- Sub Form_Load ()
- Load form2
- pic_count = 0
- End Sub
- Sub Image1_Click (index As Integer)
- Dim PictureName As String
- PictureName = form2.Dir1.Path
- If Right$(PictureName, 1) <> "\" Then
- PictureName = PictureName + "\"
- End If
- form2.File1.ListIndex = index
- PictureName = PictureName + form2.File1
- MsgBox UCase$(PictureName), 0, "The name of that file is"
- End Sub
- Sub Picture1_DragDrop (source As Control, X As Single, Y As Single)
- source.Visible = False
- End Sub
-